
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    width: 1000px;
    height: 700px;
    background-color: #fff;
    display: flex;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 左侧功能区 */
.left-panel {
    width: 80px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.left-panel .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.left-panel .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.left-panel .icon:hover {
    background-color: #0056b3;
}

/* 左侧会话列表 */
.sidebar {
    width: 300px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    padding: 10px;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.conversation-list {
    list-style: none;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.conversation-item:hover {
    background-color: #e9ecef;
}

.conversation-item.active {
    background-color: #007bff;
    color: #fff;
}

.conversation-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.conversation-item .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.conversation-item .nickname {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

.conversation-item .latest-message {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-item .time {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

/* 右侧聊天框 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.chat-header {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.chat-messages .message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    background-color: #f1f1f1;
    max-width: 70%;
    display: flex;
    align-items: center;
}

.chat-messages .message.self {
    background-color: #007bff;
    color: #fff;
    margin-left: auto;
}

.chat-messages .message .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-messages .message .content {
    flex: 1;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
}

.chat-input button {
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.chat-input button:hover {
    background-color: #0056b3;
}
